import java.util.ArrayList;
import java.util.List;

public class InstanceOf {
	public static void main(String[] args) {
		List<Object> objects = new ArrayList<Object>();
		objects.add(new String("Test"));
		objects.add(new Integer(10));
		objects.add(new String("Test1"));
		objects.add(new Object());

		for (Object object : objects) {
			if (object instanceof String) {
				System.out.println("This is String: " + object);
				// comment
			}
		}
	}
}
